<?php

require_once 'MySQL.php';

class Tag {
	
	public function __construct(){
		
	}
	
	
	/**
	 * Returns a list of tags in an ArrayObject according to the list of tags given 
	 * @param array $ids - an list of $ids
	 */
	public function getTags($idArr){
		$ids = "";
		foreach($idArr as $id){
			$ids .= "'". $id . "',";
		}
		$ids = substr($ids, 0, -1);
		$query = sprintf("SELECT * 
						FROM tag
						WHERE id IN(%s)", $ids);
		return MySQL::getArrayObject($query);
		
	}
}